﻿namespace GoodAdmin.System;

public class MenuInfo : BaseTreeEntity<MenuInfo>
{
    /// <summary>
    /// 菜单名称 
    ///</summary>
    public string Title { get; set; }
    /// <summary>
    /// 路由名称 
    ///</summary>
    public string Name { get; set; }
    /// <summary>
    /// 编码 
    ///</summary>
    public string Code { get; set; }
    /// <summary>
    /// 分类 
    ///</summary>
    public string Category { get; set; }
    /// <summary>
    /// 菜单类型 
    ///</summary>
    public string MenuType { get; set; }
    /// <summary>
    /// 路径 
    ///</summary>
    public string Path { get; set; }
    /// <summary>
    /// 组件 
    ///</summary>
    public string Component { get; set; }
    /// <summary>
    /// 排序码 
    ///</summary>
    public int SortCode { get; set; } = 999;
    /// <summary>
    /// 系统标识字段
    /// </summary>
    public string SystemMark { get; set; }

    public MenuMeta Meta { get; set; }
}

public class MenuSimpleInfo : BaseTreeEntityId<MenuSimpleInfo>
{
    /// <summary>
    /// 路由标题 
    ///</summary>
    public string Title { get; set; }
    /// <summary>
    /// 路由名称 
    ///</summary>
    public string Name { get; set; }
    /// <summary>
    /// 编码 
    ///</summary>
    public virtual string Code { get; set; }
    /// <summary>
    /// 分类 
    ///</summary>
    public string Category { get; set; }
    /// <summary>
    /// 菜单类型 
    ///</summary>
    public virtual string MenuType { get; set; }
    /// <summary>
    /// 路径 
    ///</summary>
    public virtual string Path { get; set; }
    /// <summary>
    /// 组件 
    ///</summary>
    public string Component { get; set; }
    /// <summary>
    /// 图标 
    ///</summary>
    public virtual string Icon { get; set; }
    /// <summary>
    /// 颜色 
    ///</summary>
    public string Color { get; set; }

    /// <summary>
    /// 是否缓存
    /// </summary>
    public bool IsKeepAlive { get; set; } = true;

    /// <summary>
    /// 是否固定在标签页中
    /// </summary>
    public bool IsAffix { get; set; } = false;
    /// <summary>
    /// 是否全屏
    /// </summary>
    public bool IsFull { get; set; } = false;
    /// <summary>
    /// 是否隐藏
    /// </summary>
    public bool IsHide { get; set; } = false;

    /// <summary>
    /// 是否外链
    /// </summary>
    public bool IsLink { get; set; }

    /// <summary>
    /// 链接地址
    /// </summary>
    public string Link { get; set; }
    /// <summary>
    /// 排序码 
    ///</summary>
    public int SortCode { get; set; } = 999;
    /// <summary>
    /// 系统标识字段
    /// </summary>
    public string SystemMark { get; set; }
    public string ActiveMenu { get; set; }
}

public class ResourceInfo
{
    /// <summary>
    /// 路由
    /// </summary>
    public string ApiRoute { get; set; }
    /// <summary>
    /// 是否需要数据范围
    /// </summary>
    public bool IsDataScope { get; set; }
    /// <summary>
    /// 数据范围
    /// </summary>
    public string DataScopeType { get; set; }

    /// <summary>
    /// 自定义数据范围
    /// </summary>
    public List<long> DefineScopeOrgList { get; set; }
}